import { Inject, Get } from '@midwayjs/core';
import { CoolController, BaseController } from '@cool-midway/core';
import { ContentBannerService } from '../../service/banner';
import { ContentBannerEntity } from '../../entity/banner';

@CoolController({
    api: ['list'],
    service: ContentBannerService,
    entity: ContentBannerEntity,
})
export class ProviderContentBannerController extends BaseController {
    @Inject()
    contentBannerService: ContentBannerService;

    @Get('/list', { summary: '获取轮播图列表' })
    async list() {
        return this.ok(await this.contentBannerService.listOpen());
    }
}

